mixin lr-grid(label)
  .lr-grid&attributes(attributes)
    .left.text-right.inline-block: label.control-label #{label}
    .right.inline-block: block

//  offsets = [0, null, 不传] 时，不添加col-md-offset-#{offsets}
mixin grid(cols, offsets)
  if offsets
    +grid_with_offset(cols, offsets)&attributes(attributes)
      block
  else
    +grid_without_offset(cols)&attributes(attributes)
      block

// 以下mixin不建议外部调用
mixin grid_with_offset(cols, offsets)
  div(class="col-xs-#{cols} col-md-#{cols} col-md-offset-#{offsets}")&attributes(attributes)
    block

mixin grid_without_offset(cols)
  div(class="col-xs-#{cols} col-md-#{cols}")&attributes(attributes)
    block